
import sort.*;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * Created by pintec on 2017/8/23.
 */
public class TestDemo {
    public static void main(String[] args) {
        List<Bean> list = new ArrayList<Bean>();
        for (int i = 1; i < 10; i++) {
            Bean bean = new Bean();
            bean.setName("name_" + i);
            bean.setPriority(new Random().nextInt(10));
            list.add(bean);
        }
        Bean bean = list.get(0);
        bean.setName("test");
        System.out.println(bean.getPriority() + "|" + bean.getName());
        for (Bean b : list) {
            System.out.println(b.getPriority() + "|" + b.getName());
        }
    }
}
